const { exec } = require('../db/mysql')
const login = (username='111', password='222') => {
  console.log(username, password)
  let sql = `SELECT username from users WHERE username='${username}' AND password='${password}'`
  return exec(sql).then((res) => {
    console.log('res', res)
    if (res.length > 0) {
      return true
    } else {
      return false
    }
  })
}

module.exports = {
  login
}